#include<bits/stdc++.h>
using namespace std;

const int MAXN = 10005;

// 高精度加法，返回结果的长度
int add(int a[], int lena, int b[], int lenb, int c[]) {
    int lenc = max(lena, lenb);
    int carry = 0;
    
    for(int i = 0; i < lenc || carry; i++) {
        if(i < lena) carry += a[i];
        if(i < lenb) carry += b[i];
        c[i] = carry % 10;
        carry /= 10;
        if(carry && i == lenc - 1) lenc++;
    }
    
    return lenc;
}

int main() {
    string s1, s2;
    int a[MAXN], b[MAXN], c[MAXN];
    
    cin >> s1 >> s2;
    
    // 转换为数组（倒序存储）
    int lena = s1.length(), lenb = s2.length();
    for(int i = 0; i < lena; i++) a[i] = s1[lena-1-i] - '0';
    for(int i = 0; i < lenb; i++) b[i] = s2[lenb-1-i] - '0';
    
    // 计算并输出
    int lenc = add(a, lena, b, lenb, c);
    for(int i = lenc-1; i >= 0; i--) cout << c[i];
    
    return 0;
}
